home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks96
/
FlyPaper.sit
/
Fly Paper
/
FlyPaper Source
/
New Sources
/
ClippingFile.h
< prev
next >
Wrap
Text File
|
1996-06-22
|
2KB
|
90 lines
#ifndef CLIPPINGFILE_H
#define CLIPPINGFILE_H
#ifndef FLYPAPERAPP_H
#include "FlyPaperApp.h"
#endif
#ifndef __DRAG__
#include <Drag.h>
#endif
#define kMyClippingType 'FlyD'
#define kTextClippingType 'clpt'
#define kSoundClippingType 'clps'
#define kPictureClippingType 'clpp'
#define kFinderClippingSignature 'drag'
#define kMyClippingSignature kSignature
#define kClippingTOCResType 'drag'
#define kClippingTOCResID 128
#define kFlavorResID 256
class CThumbnail;
class CClippingFileData;
class CClippingFile
{
public:
CClippingFile (FSSpec& fileOnDisk);
CClippingFile (short refNum);
~CClippingFile ();
static CClippingFile* NewClippingFileFromDragItem (DragReference dragRef,
ItemReference itemRef, Point dropPoint, short tile);
protected:
static CClippingFile* NewClippingFile (FSSpec& fileLocation, OSType primaryFlavor = '????');
void InitCClippingFile ();
public:
void AddFlavor (const FlavorType flavorType, const Handle flavorData);
void AddThumbnail (CThumbnail& thumbnail);
CThumbnail* GetThumbnail ();
short CountFlavors ();
void GetIndFlavor (short index, FlavorType& gotFlavor, Handle& gotHandle);
void GetIndFlavorType (short index, FlavorType& gotFlavor);
DragReference BuildDragReference ();
CClippingFileData* GetData () { return fData; }
Boolean GetFSSpec (FSSpec& spec);
protected:
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
// ClippingFlavor -- each flavor in the ClippingTOC is represented by this data structure. This
// is a best-guess interpretation of the Finder's clipping file format.
typedef struct {
FlavorType flavorType;
unsigned long reserved1;
unsigned long reserved2;
unsigned long reserved3;
} ClippingFlavorRec;
// ClippingTOC -- table of contents for a clipping file. This is a best-guess interpretation
// of the Finder's clipping file format.
typedef struct {
unsigned long version;
unsigned long reserved1;
unsigned long reserved2;
unsigned short reserved3;
unsigned short flavorCount;
ClippingFlavorRec flavors [];
} ClippingTOCRec, **ClippingTOCHandle;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
short fRefNum;
ClippingTOCHandle fClippingTOC;
CClippingFileData* fData;
};
#endif